home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2002 #3 / Amiga Plus CD - 2002 - No. 03.iso / AmigaPlus / Tools / Development / envCPP31 / c++ / rexx / ifelse.rexx < prev    next >
Encoding:
OS/2 REXX Batch file  |  2002-01-01  |  1.0 KB  |  58 lines

  1. /* rexx macro */
  2.  
  3. options results                             /* enable return codes     */
  4.  
  5. if (left(address(), 6) ~= "GOLDED") then    /* not started by GoldEd ? */
  6.  
  7.     address 'GOLDED.1'
  8.  
  9. 'LOCK CURRENT RELEASE=4'                    /* lock GUI, gain access   */
  10.  
  11. if (RC ~= 0) then
  12.  
  13.     exit
  14.  
  15. options failat 6                            /* ignore warnings         */
  16.  
  17. signal on syntax                            /* ensure clean exit       */
  18.  
  19. /* ------------------------- INSERT YOUR CODE HERE: ------------------ */
  20.  
  21. 'INSERT LINE'
  22. 'PING SLOT 0'
  23. 'TEXT STAY T="if ()"'
  24. 'DOWN'
  25. 'INSERT LINE'
  26. 'TEXT STAY T="{"'
  27. 'DOWN'
  28. 'INSERT LINE'
  29. 'TEXT STAY T="}"'
  30. 'INSERT LINE'
  31. 'DOWN'
  32. 'DOWN'
  33. 'INSERT LINE'
  34. 'TEXT STAY T="else"'
  35. 'DOWN'
  36. 'INSERT LINE'
  37. 'TEXT STAY T="{"'
  38. 'DOWN'
  39. 'INSERT LINE'
  40. 'TEXT STAY T="}"'
  41. 'INSERT LINE'
  42. 'PONG SLOT 0'
  43. 'LEFT'
  44.  
  45. /* ---------------------------- END OF YOUR CODE ----------------------- */
  46.  
  47. 'UNLOCK' /* VERY important: unlock GUI */
  48.  
  49. exit
  50.  
  51. SYNTAX:
  52.  
  53. SAY "Sorry, error line" SIGL ":" ERRORTEXT(RC) ":-("
  54.  
  55. 'UNLOCK'
  56.  
  57. exit
  58.